package com.dailyblue.java.cloud.config;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;

@Slf4j
@EnableDiscoveryClient
@SpringBootApplication
public class ExampleConfigApplication {
    @SneakyThrows
    public static void main(String[] args) {
        ConfigurableApplicationContext context
                = SpringApplication.run(ExampleConfigApplication.class, args);
        /*while(true){
            String name = context.getEnvironment().getProperty("student.name");
            String age = context.getEnvironment().getProperty("student.age");
            log.info("name:{},age:{}", name, age);
            Thread.sleep(2000);
        }*/
    }
}